<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3"/>
<title>Duye SDK User Wizard: duye::Socket Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Duye SDK User Wizard
   &#160;<span id="projectnumber">V1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>duye</b></li><li class="navelem"><a class="el" href="classduye_1_1_socket.html">Socket</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classduye_1_1_socket-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">duye::Socket Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>server socket class  
 <a href="classduye_1_1_socket.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="duye__socket_8h_source.html">duye_socket.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa20e47cfe84bab0d0ad71efbc621b708"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_socket.html#aa20e47cfe84bab0d0ad71efbc621b708">open</a> (const NetProtocol &amp;protocol, const bool isBlock=true)</td></tr>
<tr class="memdesc:aa20e47cfe84bab0d0ad71efbc621b708"><td class="mdescLeft">&#160;</td><td class="mdescRight">open socket  <a href="#aa20e47cfe84bab0d0ad71efbc621b708"></a><br/></td></tr>
<tr class="separator:aa20e47cfe84bab0d0ad71efbc621b708"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4617e822e28c74457e49217d5e4b5df6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4617e822e28c74457e49217d5e4b5df6"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>open</b> (const NetProtocol &amp;protocol, const std::string &amp;ifName, const bool isBlock=true)</td></tr>
<tr class="separator:a4617e822e28c74457e49217d5e4b5df6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd4ea0eb5ca7d5f8db07af6b9ef7bad6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afd4ea0eb5ca7d5f8db07af6b9ef7bad6"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>isOpen</b> () const </td></tr>
<tr class="separator:afd4ea0eb5ca7d5f8db07af6b9ef7bad6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affe33679ec4192538d937be35ebd252d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_socket.html#affe33679ec4192538d937be35ebd252d">close</a> (const int32 how=2)</td></tr>
<tr class="memdesc:affe33679ec4192538d937be35ebd252d"><td class="mdescLeft">&#160;</td><td class="mdescRight">shutdown connecting  <a href="#affe33679ec4192538d937be35ebd252d"></a><br/></td></tr>
<tr class="separator:affe33679ec4192538d937be35ebd252d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ccffaee3432e9f426511aedee04a506"><td class="memItemLeft" align="right" valign="top">int32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_socket.html#a9ccffaee3432e9f426511aedee04a506">sockfd</a> () const </td></tr>
<tr class="memdesc:a9ccffaee3432e9f426511aedee04a506"><td class="mdescLeft">&#160;</td><td class="mdescRight">get sock fd  <a href="#a9ccffaee3432e9f426511aedee04a506"></a><br/></td></tr>
<tr class="separator:a9ccffaee3432e9f426511aedee04a506"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5d40002de30fe1e6e1fc1406d81f656"><td class="memItemLeft" align="right" valign="top">uint8 *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_socket.html#ab5d40002de30fe1e6e1fc1406d81f656">error</a> ()</td></tr>
<tr class="memdesc:ab5d40002de30fe1e6e1fc1406d81f656"><td class="mdescLeft">&#160;</td><td class="mdescRight">get last error string  <a href="#ab5d40002de30fe1e6e1fc1406d81f656"></a><br/></td></tr>
<tr class="separator:ab5d40002de30fe1e6e1fc1406d81f656"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>server socket class </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="affe33679ec4192538d937be35ebd252d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool duye::Socket::close </td>
          <td>(</td>
          <td class="paramtype">const int32&#160;</td>
          <td class="paramname"><em>how</em> = <code>2</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>shutdown connecting </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">how</td><td>: default is 2 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true/false </dd></dl>
<dl class="section note"><dt>Note</dt><dd>how = 0 : stop receive data how = 1 : stop send data how = 2 : both above way </dd></dl>

</div>
</div>
<a class="anchor" id="ab5d40002de30fe1e6e1fc1406d81f656"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8* duye::Socket::error </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>get last error string </p>
<dl class="section return"><dt>Returns</dt><dd>error string </dd></dl>
<dl class="section note"><dt>Note</dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="aa20e47cfe84bab0d0ad71efbc621b708"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool duye::Socket::open </td>
          <td>(</td>
          <td class="paramtype">const NetProtocol &amp;&#160;</td>
          <td class="paramname"><em>protocol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const bool&#160;</td>
          <td class="paramname"><em>isBlock</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>open socket </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">protocol</td><td>: network protocol </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ifName</td><td>: interface name </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">isBlock</td><td>: block/unblock, default is block </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true/false </dd></dl>
<dl class="section note"><dt>Note</dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="a9ccffaee3432e9f426511aedee04a506"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32 duye::Socket::sockfd </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>get sock fd </p>
<dl class="section return"><dt>Returns</dt><dd>sock fd </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>Z:/duye/src/duyebase/system/<a class="el" href="duye__socket_8h_source.html">duye_socket.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Feb 27 2017 15:19:20 for Duye SDK User Wizard by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3
</small></address>
</body>
</html>
